Tracking gains in bluechip stocks, investors were also seen building up position in broader markets, lifting the small-cap and mid-cap indices by 0.83 and 0.15 per cent
Analysts suggest investors remain in a wait-and-watch mode and not jump in to buy stocks across-the-board.
Barring oil and gas, all BSE sectoral indices finished in the green.
Top gainers include Yes Bank, HUL, Vedanta, NTPC, Bharti Airtel, Adani Ports, PowerGrid and Tata Motors, rising up to 5 per cent.
The 30-share Sensex stayed in the green for the better part of the session and hit the day's high of 38,297.70 as buying pace gathered momentum towards the fag-end.
The Sensex ended above 27,000 for the first time while the Nifty topped 8,100.
Investors booked profits in range-bound trade, led by PSU, oil & gas, energy, infrastructure, telecom, realty, healthcare, bankex, FMCG, capital goods and power counters.
The sentiment got support from better-than-expected earning results by select companies and continuous buying by domestic financial institutions.
Infosys, TCS, HUL and Reliance Industries were the top gainers of the day.
Market experts believe the retreat is because of uncertainty.
The NSE Nifty after shuttling between 10,441.90 and 10,341.90, ended 6.15 points, or 0.06 per cent down at 10,380.45.
Among top losers that dragged down key indices were Infosys, TCS, Reliance, SBI, Tata Steel and ITC, falling up to 2.15 per cent.
The 50-share NSE Nifty slipped below the 8,200-mark to touch a low of 8,154.45, but settled at 8,170.80, down 90.95 points, or 1.10 per cent
The broader markets ended mixed with mid-caps gaining 0.1 per cent and small-caps falling 0.1 per cent on the BSE.
Sustained FII inflows and fresh spell of buying by domestic institutional investors fuelled the rally
Investor sentiments remained upbeat tracking global developments as the US, China geared up for trade talks due this week.
The 50-stock NSE barometer Nifty finished 22.50 points, or 0.21 per cent, down at 10,526.20
Market breadth depicted strength. There were almost 3 gainers against every loser on BSE
The NSE Nifty cracked below the 10,800-mark to hit a low of 10,753.05 intra-day, before closing at 10,762.45 with a loss of 59.40 points, or 0.55 per cent.
The broader NSE Nifty slipped below the 10,500-mark by falling 103 points, or 0.97 per cent, at 10,482.20. It touched a high of 10,645.50 and a low of 10,464.05 during the day.
The 30-share Sensex ended down 245 points at 28,799 and the 50-share Nifty closed down 81 points at 8,750
Fresh buying by domestic institutional investors and better-than-expected June quarter results from some blue-chip companies boosted investor sentiment
Sensex ended at 26,272 up 125 points and Nifty ended at 7,831 up by 35 points.
Equity benchmarks erased early gains after realty, capital goods, teck, auto, PSU, IT, power and bankex counters came under selling pressure, falling up to 1.28 per cent.
Rate-sensitive sectors like banks, realty and auto witnessed heavy selling pressure ahead of the RBI Monetary policy which is scheduled on September 29.
It was the second straight week of gains for the benchmarks.
The NSE Nifty too recovered over 100 points, or 0.96 per cent, to end at 10,576.85.
Coal India topped the losers' list in the Sensex pack on Tuesday, falling 2.36 per cent, followed by Bharti Airtel at 2.16 per cent.
In India, however, the Nifty continues to climb a wall of worry as general elections loom, fiscal deficit surges and the current account deficit is barely under control following subdued gold and crude prices, says Sonali Ranade.
The US FOMC concludes its two-day meeting today while the Bank of Japan will start its two-day meeting today.
IIP for November 2015 and CPI for December 2015 will be announced today.
A declining rupee, elevated crude oil prices and sustained foreign fund outflows added to the gloom
The market breadth, indicating the overall health of the market, turned negative from positive
Among Sensex shares, HDFC Bank fell the most by 2.58 per cent, followed by SBI (2.12 per cent), HDFC (2.09 per cent), and IndusInd Bank (2.02 per cent). Axis Bank, Bajaj Finserv, M&M, L&T, Reliance, Infosys and TCS were among the major losers. In contrast, Tata Motors, Maruti, NTPC, Sun Pharma, Power Grid and Titan were among the gainers.
Markets closed in the red on domestic worries.
Construction major L&T was the biggest gainer among the Sensex components, spurting 2.30 per cent, after the company said its board has approved a Rs 9,000-crore share buyback plan.
Metal stocks lose ground with Hindalco, Tata Steel, Sesa Sterlite down 4-10%.
A recovery in rupee, buying by domestic institutional investors, encouraging earnings by select blue-chips and stock specific buying helped the market get back on its feet
The 50-share NSE Nifty gained 53.30 points or 0.61 per cent to 8,778.
Sun Pharma was by far the biggest gainer in the Sensex pack, surging 8.13 per cent, followed by Dr Reddy's at 4.92 per cent.